home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / tex / dvivga9.zip / MOVEDOWN.H < prev    next >
Text File  |  1988-05-30  |  1KB  |  36 lines

  1. /* -*-C-*- movedown.h */
  2. /*-->movedown*/
  3. /**********************************************************************/
  4. /****************************** movedown ******************************/
  5. /**********************************************************************/
  6.  
  7. void
  8. movedown(a)
  9. register INT32 a;
  10.  
  11. {
  12.     /*    From DVITYPE Version 2.6:
  13.     "Vertical motion is done similarly [to horizontal motion handled
  14.     in moveover()],  but with  the threshold  between ``small''  and
  15.     ``large'' increased by  a factor of  five. The idea  is to  make
  16.     fractions  like  ``1/2''  round  consistently,  but  to   absorb
  17.     accumulated rounding errors in the baseline-skip moves."
  18.  
  19.     The one precaution we need to  take here is that fontptr can  be
  20.     NULL, which we treat like  a large movement.  This NULL  pointer
  21.     was used without error  on many different  machines for 2  years
  22.     before it was caught on the VAX VMS implementation, which  makes
  23.     memory page 0 inaccessible.
  24.     */
  25.     v += a;
  26.     if ((fontptr == (struct font_entry *)NULL) ||
  27.         (ABS(a) >= 5*fontptr->font_space))
  28.     vv = PIXROUND(v, conv) + tmargin;
  29.     else
  30.     {
  31.     vv += PIXROUND(a, conv);
  32.     vv = fixpos(vv-tmargin,v,conv) + tmargin;
  33.     }
  34. }
  35.  
  36.